From 1873dc6b45122bd55441c956c5b06ab5dabe5e54 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Thu, 11 Aug 2005 21:19:45 +0000 Subject: [PATCH] Fix getdomaininfo for vmx guests. Replaces Intel patch [14/15]. Signed-off-by: Keir Fraser --- xen/arch/x86/dom0_ops.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/dom0_ops.c b/xen/arch/x86/dom0_ops.c index b933cbdfaa..01ea09b74e 100644 --- a/xen/arch/x86/dom0_ops.c +++ b/xen/arch/x86/dom0_ops.c @@ -404,16 +404,18 @@ void arch_getdomaininfo_ctxt( memcpy(c, &v->arch.guest_context, sizeof(*c)); - /* IOPL privileges are virtualised -- merge back into returned eflags. */ - BUG_ON((c->user_regs.eflags & EF_IOPL) != 0); - c->user_regs.eflags |= v->arch.iopl << 12; - if ( VMX_DOMAIN(v) ) { save_vmx_cpu_user_regs(&c->user_regs); __vmread(CR0_READ_SHADOW, &c->ctrlreg[0]); __vmread(CR4_READ_SHADOW, &c->ctrlreg[4]); } + else + { + /* IOPL privileges are virtualised: merge back into returned eflags. */ + BUG_ON((c->user_regs.eflags & EF_IOPL) != 0); + c->user_regs.eflags |= v->arch.iopl << 12; + } c->flags = 0; if ( test_bit(_VCPUF_fpu_initialised, &v->vcpu_flags) ) -- 2.30.2